home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / mus / play / DES_Tracker2_00.lha / DTL / rexx / Play.rexx < prev   
OS/2 REXX Batch file  |  1993-12-17  |  1KB  |  61 lines

  1. /*********************************************************/
  2. /* This is an example program called Play.Rexx that will */
  3. /* simply load and play the song you specify.  If you    */
  4. /* don't specify a song to play, then a req.library file */
  5. /* requester will pop up so you can select a song.       */
  6. /*                                                       */
  7. /*        Designed and written by Darren Schebek         */
  8. /*          Copyright (c)1992 by Darren Schebek          */
  9. /*                                                       */
  10. /*          Set tab size to 3 for this file. :)          */
  11. /*********************************************************/
  12.  
  13. if ~show('l','destracker.library') then
  14.     if ~addlib('destracker.library',-5,-30,0) then
  15.         do
  16.             say "Couldn't find destracker.library."
  17.             exit 5
  18.         end
  19.  
  20. If arg(1) ~= '' then
  21.     do
  22.         if ~exists(arg(1)) then
  23.             do
  24.                 say '*** Could not locate "'arg(1)'".'
  25.                 exit
  26.             end
  27.     end
  28.  
  29. a1 = right(arg(1),1)
  30. if arg(1) ~= '' && a1 ~= ':' && a1 ~= '/' then
  31.     do
  32.         r = DES_LoadModule(arg(1))
  33.         if left(r,3) = '***' then
  34.             do
  35.                 say r
  36.                 exit
  37.             end
  38.         DES_BeginPlay()
  39.         exit
  40.     end
  41.  
  42. if ~show('l','req.library') then
  43.     if ~addlib('req.library',-5,-60,2) then
  44.         do
  45.             say "Couldn't find req.library."
  46.             exit 5
  47.         end
  48.  
  49. call pragma('Directory',arg(1))
  50. name = filereq('Select a song to play...')
  51. if name ~= '' then
  52.     do
  53.         r = DES_LoadModule(name)
  54.         if left(r,3) = '***' then
  55.             do
  56.                 say r
  57.                 exit
  58.             end
  59.         DES_BeginPlay()
  60.     end
  61.